﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace ProcessControl.Interface
{
    public interface IBuget
    {
        /// <summary>
        /// 更新预算PR余额
        /// </summary>
        /// <param name="BudgetCode">预算编号</param>
        /// <param name="balance">余额</param>
        /// <returns>成功返回true,失败返回false</returns>
        bool UpdateBalaceFromPR(string BudgetCode, double balance);

        /// <summary>
        /// 更新预算PR余额
        /// </summary>
        /// <param name="BudgetCode">预算编号</param>
        /// <param name="balance">余额</param>
        /// <param name="Msg">输出错误信息</param>
        /// <returns>成功返回true,失败返回false</returns>
        bool UpdateBalaceFromPR(string BudgetCode, double balance, out string Msg);

        /// <summary>
        /// 更新预算CAPEX余额
        /// </summary>
        /// <param name="bugetNumber">预算编号</param>
        /// <param name="balance">余额</param>
        /// <param name="Msg">输出错误信息</param>
        /// <returns>成功返回true,失败返回false</returns>
        bool UpdateBalaceFromCAPEX(string BudgetCode, double balance, out string Msg);

        /// <summary>
        /// 更新预算PO余额
        /// </summary>
        /// <param name="bugetNumber">预算编号</param>
        /// <param name="balance">余额</param>
        /// <returns>成功返回true,失败返回false</returns>
        bool UpdateBalaceFromPO(string BudgetCode, double balance, out string Msg);

        /// <summary>
        /// 更新预算余额
        /// </summary>
        /// <param name="BudgetCode">预算编号</param>
        /// <param name="BudgetType">预算类型</param>
        /// <param name="balance">余额</param>
        /// <param name="Msg">输出错误信息</param>
        /// <returns>成功返回true,失败返回false</returns>
        bool UpdateBudgetBalace(string BudgetCode, string BudgetType, double balance, out string Msg);

        /// <summary>
        /// 根据预算编号查询预算
        /// </summary>
        /// <param name="BudgetCode">预算编号</param>
        /// <param name="balance">余额</param>
        /// <returns>成功返回true,失败返回false</returns>
        DataTable QueryBudgetByBudgetCode(string BudgetCode);
    }
}
